/*
 * @(#)Config.java			0.1 26/11/2010
 * Copyright (C) 2010 Grupo de Alunos abaixo
 * 
 * Universidade Federal do ABC
 * Vida Artificial - 3o quadrimestre de 2010
 * Aluno: Abner
 * Aluno: Cláudio Antônio Peanho
 * Aluno: Fabrizio Borelli
 * Aluna: Maitê Balhester
 * Aluno: Rafael Munhoz
 * Professora Dr. Karla Vittori
 * Projeto: Simulação de Colônia de Formigas (antcolonyswarm)
 * 
 * Código baseado em jheatbugs-3.0 de Timothy Howe
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.edu.ufabc.va.acs.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * @author Peanho
 * 
 */
public class ConfigurationLoader {

	/** configurações */
	private static final Properties	configuration;

	static {
		configuration = new Properties();
		FileInputStream fis = null;
		try {
			fis = new FileInputStream("configuration.properties");
		} catch (FileNotFoundException e) {
			System.err.println("Arquivo não encontrado");
		}
		try {
			configuration.load(fis);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			System.err.println("falha ao carregar o arquivo de configurações");
		}
	}

	/**
	 * Retorna instância de {@link Properties} com mapeamento chave-valor de
	 * parâmetros de configuração.
	 * 
	 * @return configuração
	 */
	public static Properties getConfiguration() {
		return configuration;
	}
}
